Repository navigation
[FEAT/#120] 루트 목록 수정 API 구현 - #121
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
khj011219
approved these changes
Oct 7, 2026
khj011219
left a comment
Contributor
There was a problem hiding this comment.
기존 루트와 비교해서 불필요한 루트 삭제와 재생성을 방지한 점 좋았습니다! 구현하시느라 고생하셨습니다 👍
Kyoung-M1N
reviewed
Oct 7, 2026
Comment on lines
+56
to
+64
| List<Route> existingRoutes = routeRepository.findByActivityIdOrderBySequenceAsc(activityId); | ||
| List<UpdateRouteCommand> existingCommands = existingRoutes.stream() | ||
| .map(route -> new UpdateRouteCommand(route.getName(), route.getSequence())) | ||
| .toList(); | ||
| if (existingCommands.equals(sortedCommands)) { | ||
| return existingRoutes.stream() | ||
| .map(RouteMapper::toResult) | ||
| .toList(); | ||
| } |
Member
There was a problem hiding this comment.
기존과 Route와 동일한 경우에 early return 하는 방법은 정말 좋은 것 같아요!
Kyoung-M1N
reviewed
Oct 7, 2026
Comment on lines
+49
to
+50
| Activity activity = activityRepository.findById(activityId) | ||
| .orElseThrow(ActivityNotFoundException::new); |
Member
There was a problem hiding this comment.
현재 로직에서 Activity를 사용하지 않는다면 엔티티를 실제로 불러오는 방법보다는 exists등을 이용해서 불필요한 데이터의 로딩을 방지하면서 검증하는 방법도 좋을 것 같아요!
Kyoung-M1N
approved these changes
Oct 7, 2026
Kyoung-M1N
left a comment
Member
There was a problem hiding this comment.
빠르게 대응하면서도 너무 꼼꼼하게 로직을 잘 작성해주신 것 같아요!
고생하셨습니다!👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Related Issue
📤 Tasks
PUT /api/v1/activity/{activityId}/route)RoutesCreateRequest,RoutesUpdateRequest)📸 Screenshot
루트 수정 API 테스트 결과
💌 To Reviewer